package com.weaving.monitor.dto;

import lombok.Data;
import java.util.List;

@Data
public class MachineDetailDto {
    // 基本信息
    private Integer machineNumber;
    private Integer currentSpeed;
    
    // 机器/订单详情
    private String materialType;
    private String orderNumber;
    private Double orderQuantity;
    private Double completedQuantity;
    private Double currentMeters;
    
    // 工艺/疵点详情
    private String processCard;
    private String productionEmployee;
    private Integer parkingDefectCount;
    private Integer nonParkingDefectCount;
    private Integer totalDefectCount;
    
    // 梳栉/盘头详情
    private List<GuideBarDetail> guideBarDetails;
    
    // 图表数据
    private ChartData chartData;
    
    @Data
    public static class GuideBarDetail {
        private String guideBarNumber;
        private String machineBobbinNumber;
        private String pendingBobbinNumber;
    }
    
    @Data
    public static class ChartData {
        // 订单完成进度饼图数据
        private List<CompletionData> completionData;
        
        // 故障分布散点图数据
        private List<FaultData> faultData;
        
        // 时间图数据
        private List<TimeData> timeData;
    }
    
    @Data
    public static class CompletionData {
        private String label;
        private Double value;
        private String color;
    }
    
    @Data
    public static class FaultData {
        private String type;
        private Double x;
        private Integer y;
        private String color;
    }
    
    @Data
    public static class TimeData {
        private String employee;
        private Integer hours;
        private String color;
        private String startTime; // 开始时间，格式：HH:mm
        private String endTime;   // 结束时间，格式：HH:mm
    }
    
    @Data
    public static class DefectStats {
        private Integer parkingDefectCount;    // 停车疵点数量
        private Integer nonParkingDefectCount; // 非停车疵点数量
        private Integer totalDefectCount;      // 总疵点数量
        private String processCard;            // 生产卡片号
    }
} 